<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<title>电子病历</title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="电子病历,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="./css/weui.css" />
<link rel="stylesheet" href="./css/example.css" />
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
</head>
<script type="text/javascript">
var id = getUrlParam("id");
$(document).ready(function(){

    $("#back1").html("<<返回");

	$.ajax({
         url: "./medicalRecord/getById",
         data: {
         	id : id
         },
         type: "POST",
         dataType: 'json',
         cache: false,
         success: function (ret) {
	         if(ret!=null){
       			$("#name").html(ret.name);
       			$("#medicalrecord").html(ret.medicalrecord.replaceAll("\n","<br>"));
	         }
         }
     });
});

function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return  decodeURI(r[2]); return null;
}

</script>
<body ontouchstart>
<div class="container js_container">
</div>
<form action="" name="form" id="form">
<div class="page">
    <div class="bd">
        <div class="weui_grids">
       	<div class="weui_cells_title" >
       		<div class="weui_cell weui_cell_select weui_select_before">
        		<div class="weui_cell_bd weui_cell_primary page_title"  style="font-size: 14px;">
            		<span id="name">-</span>
        		</div>
        	</div>
       	</div>

       	<div class="weui_cell">
             <div class="weui_cell_bd weui_cell_primary">
               	<span style="font-size: 13px;" id=""><span id="medicalrecord"></span></span>
             </div>
         </div>
            
        </div>
    </div>
    
</div>
	</form>
</body>
</html>
